using System;
using System.Runtime.Serialization;

namespace Jonathan.SharpDB
{
    /// <summary>
    /// A Column for a SharpDB Table...
    /// </summary>
    public class Column
    {
        #region - Variables -

        /// <summary>
        /// Name of Column...
        /// </summary>
        private string m_Name;

        /// <summary>
        /// Type of Column...
        /// </summary>
        private ColumnType m_Type;

        #endregion

        #region - Constructors -

        /// <summary>
        /// Creates a new Column...
        /// </summary>
        public Column() : this("", ColumnType.STRING)
        {
        }

        /// <summary>
        /// Creates a new Column...
        /// </summary>
        /// <param name="name">Name of the Column.</param>
        public Column(string name) : 
            this(name, ColumnType.STRING)
        {
        }

        /// <summary>
        /// Creates a new Column...
        /// </summary>
        /// <param name="name">Name of the Column.</param>
        /// <param name="type">Type of the Column.</param>
        public Column(string name, ColumnType type)
        {
            this.m_Name = name;
            this.m_Type = type;
        }

        #endregion

        #region - Properties -

        /// <summary>
        /// Gets or Sets the Name of the Column...
        /// </summary>
        public string ColumnName
        {
            get { return this.m_Name; }

            set { this.m_Name = value; }
        }

        /// <summary>
        /// Gets or Sets the Type of the Column...
        /// </summary>
        public ColumnType ColumnType
        {
            get { return this.m_Type; }

            set { this.m_Type = value; }
        }

        #endregion
    }
}
